package com.yoda.mall.model.vo;

import com.yoda.mall.model.entity.oms.Order;
import lombok.Data;
import org.springframework.beans.BeanUtils;

/**
 * @author shawn
 * @date 2022年 12月 19日 13:21
 */
@Data
public class DeliveryParamVo {
   private Long orderId;
   private String orderSn;
   private String receiverName;
   private String receiverPhone;
   private String receiverPostCode;
   private String address;
   private String deliveryCompany;
   private String deliverySn;

   public static Order init(DeliveryParamVo vo){
       Order order = new Order();
       BeanUtils.copyProperties(vo,order);
       order.setId(vo.getOrderId());
       return order;
   }
}
